#include<stdio.h>

#define N 10

int get_sum_two(int arr[], int n);
int main(int argc, char *argv[])
{
	int arr[N] = {0};
	int ans;
	printf("请输入10个1-9的数");
	for(int i = 0; i < N; i++){
		scanf("%d", &arr[i]);
	}
	ans = get_sum_two(arr, N);

	printf("\n%d\n", ans);

	return 0;
}

int get_sum_two(int arr[], int n){
	int ans = 0;
	for(int i = 0; i < n; i++){//确保每个数都被遍历
		for(int j = 0; j < n; j++){//自己不能和自己
			if(i != j){
				ans += (arr[i]*10+arr[j]);
			}
		}
	}
	return ans;
}

